package eu.dominicum.ft.pd.mao;

import javax.annotation.PostConstruct;
import javax.inject.Named;
import javax.validation.constraints.NotNull;

/**
 * Method Arguments Object for {@link eu.dominicum.ft.pd.FantasyTourConfiguration#make(MakeFantasyTourConfigurationMAO)}.
 *
 * @author Harry Klerks
 * @since 2013M1
 */
@Named
public final class MakeFantasyTourConfigurationMAO {

    /**
     * The default number of riders in a participant's list.
     */
    private static final Integer DEFAULT_RIDERS_IN_LIST_COUNT = 15;

    /**
     * The default number of substitute riders ina participant's list.
     */
    private static final Integer DEFAULT_SUBSTITUTES_IN_LIST_COUNT = 0;

    /**
     * The default value for rider substitution.
     */
    private static final Boolean DEFAULT_RIDER_SUBSTITUTION = Boolean.FALSE;
    /**
     * Name of the Score calculation configuration.
     */
    @NotNull(message = "Fantasy tour configuratie moet een naam hebben")
    private String name;

    /**
     * The number of riders in a participant's list.
     */
    @NotNull(message = "Aantal renners in deelnemerlijst moet een waarde hebben")
    private Integer ridersInListCount;

    /**
     * The number of substitute riders in a participant's list.
     */
    @NotNull(message = "Aantal reserves in deelnemerlijst moet een waarde hebben")
    private Integer substituteRidersInListCount;

    /**
     * A flag to indicate rider substitution on exit.
     */
    @NotNull(message = "Inschuiven moet een waarde hebben")
    private Boolean substituteRiders;

    /**
     * The number of riders in a Youth result.
     */
    @NotNull(message = "Aantal coureurs in uitslag Jongeren moet een waarde hebben")
    private Integer ridersInYouthResultCount;

    /**
     * The number of riders in an Overall result.
     */
    @NotNull(message = "Aantal coureurs in uitslag algemeen klassement moet een waarde hebben")
    private Integer ridersInOverallResultCount;

    /**
     * Initialiser.
     */
    @PostConstruct
    public void init() {

        this.ridersInListCount = DEFAULT_RIDERS_IN_LIST_COUNT;
        this.substituteRidersInListCount = DEFAULT_SUBSTITUTES_IN_LIST_COUNT;
        this.substituteRiders = DEFAULT_RIDER_SUBSTITUTION;
    }

    /**
     * .
     *
     * @return String
     */
    public String getName() {
        return name;
    }

    /**
     * .
     *
     * @param newName -
     */
    public void setName(final String newName) {
        this.name = newName;
    }

    /**
     * .
     *
     * @param newRidersInListCount -
     */
    public void setRidersInListCount(final Integer newRidersInListCount) {
        this.ridersInListCount = newRidersInListCount;
    }

    /**
     * .
     *
     * @return Integer
     */
    public Integer getRidersInListCount() {
        return ridersInListCount;
    }

    /**
     * .
     *
     * @param newSubstituteRidersInListCount -
     */
    public void setSubstituteRidersInListCount(final Integer newSubstituteRidersInListCount) {
        this.substituteRidersInListCount = newSubstituteRidersInListCount;
    }

    /**
     * .
     *
     * @return Integer
     */
    public Integer getSubstituteRidersInListCount() {
        return substituteRidersInListCount;
    }

    /**
     * .
     *
     * @param newSubstituteRiders -
     */
    public void setSubstituteRiders(final Boolean newSubstituteRiders) {
        this.substituteRiders = newSubstituteRiders;
    }

    /**
     * .
     *
     * @return Boolean
     */
    public Boolean getSubstituteRiders() {
        return substituteRiders;
    }

    /**
     * .
     *
     * @param newRidersInYouthResultCount -
     */
    public void setRidersInYouthResultCount(final Integer newRidersInYouthResultCount) {
        this.ridersInYouthResultCount = newRidersInYouthResultCount;
    }

    /**
     * .
     *
     * @return Integer
     */
    public Integer getRidersInYouthResultCount() {
        return ridersInYouthResultCount;
    }

    /**
     * .
     *
     * @param newRidersInOverallResultCount -
     */
    public void setRidersInOverallResultCount(final Integer newRidersInOverallResultCount) {
        this.ridersInOverallResultCount = newRidersInOverallResultCount;
    }

    /**
     * .
     *
     * @return Integer
     */
    public Integer getRidersInOverallResultCount() {
        return ridersInOverallResultCount;
    }
}
